<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./common/react.min.js"></script>
    <script src="./common/react-dom.min.js"></script>
    <script src="http://cdn.bootcss.com/babel-core/5.8.38/browser.min.js"></script>

</head>
<body>
    <div id="demo"></div>
    <div id="demo"></div>
    <script type="text/babel">
        var  MyForm = React.createClass({
            getInitialState:function(){
                return {value:'jspang'}
            },
            handleChange:function(event){
                this.setState({value:event.target.value});
                console.log(this.state.value)
            },
            render:function(){
                return(
                    <div>
                    <input type="text" value={this.state.value} onChange={this.handleChange} />
                    </div>
                )
            }
        });


       ReactDOM.render(<MyForm/>,document.getElementById('demo'))

    </script>
</body>
</html>